/**
 * Created with BlueStream
 * Date: 13. 6. 5
 * Time: 오후 3:28
 * Writer: 강석민
 */

var btnStart;

var banner_containerDiv;

var imgList;

window.onload = function(){

    init();

}

function init() {
    btnStart = document.getElementById("btnStart");
    btnStart.addEventListener("click",function(){
        startMove();
    })

    banner_containerDiv = document.getElementById("banner_container");
    imgList = banner_containerDiv.getElementsByTagName("img");

}

function output(){
    console.log(cnt.x);
}

function startMove(){
    TweenMax.to(banner_containerDiv, 1, {scrollTop:128,ease:"Cubic.easeOut",onComplete:easeCompleteFunction});
}

function easeCompleteFunction(e){
    banner_containerDiv.scrollTop = 0;
    var childList = banner_containerDiv.getElementsByTagName("div");
    var fistImgDiv = childList[0];
    banner_containerDiv.appendChild(fistImgDiv);
    startMove();
}